package com.bw.demo_mvp.net

import io.reactivex.disposables.CompositeDisposable
import java.lang.ref.WeakReference

/**
 * @Author : ZhouZiYao
 * @Time : On 2023/11/17 09:48
 * @Description :
 */
open class BasePresenter<V> {
    private lateinit var weakReference: WeakReference<V>

    protected val disposable: CompositeDisposable by lazy {
        CompositeDisposable()
    }

    fun attachView(view: V){
        if (weakReference == null){
            weakReference = WeakReference<V>(view)
        }
    }

    fun distach(){

    }
}